testrunner.define({
  
  classname : "language",

  
  testStringFormat : function() 
  {
    this.assertEquals("", "".format("az", 12, null));
    this.assertEquals("az 12 null", "{0} {1} {2}".format("az", 12, null));
    this.assertEquals("az 12 null", "{0} {1} {2}".format("az", 12, null, 15));
    this.assertEquals("az 12 {2}",  "{0} {1} {2}".format("az", 12));
  },

  testStringDistance : function() 
  {
    this.assertEquals(0, "My Song".distance("My Song"));
    this.assertEquals(1, "MySong".distance("My Song"));
    this.assertEquals(1, "My Seng".distance("My Song"));
    this.assertEquals(1, "My Song".distance("My Seng"));
    this.assertEquals(1, "My Song".distance("MySong"));
    this.assertEquals(7, "My Song (live)".distance("My Song"));
  },
  
  testNamespace : function() 
  {
    this.assertUndefined(window.__test);
    
    namespace("__test.foo.bar");
    
    this.assertObject(window.__test);
    this.assertObject(window.__test.foo);
    this.assertObject(window.__test.foo.bar);
  }
  
});